//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension SsmSap {
    // MARK: Enums

    public enum AllocationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case elasticIp = "ELASTIC_IP"
        case overlay = "OVERLAY"
        case unknown = "UNKNOWN"
        case vpcSubnet = "VPC_SUBNET"
        public var description: String { return self.rawValue }
    }

    public enum ApplicationDiscoveryStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case deleting = "DELETING"
        case refreshFailed = "REFRESH_FAILED"
        case registering = "REGISTERING"
        case registrationFailed = "REGISTRATION_FAILED"
        case success = "SUCCESS"
        public var description: String { return self.rawValue }
    }

    public enum ApplicationStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case activated = "ACTIVATED"
        case deleting = "DELETING"
        case failed = "FAILED"
        case registering = "REGISTERING"
        case starting = "STARTING"
        case stopped = "STOPPED"
        case stopping = "STOPPING"
        case unknown = "UNKNOWN"
        public var description: String { return self.rawValue }
    }

    public enum ApplicationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case hana = "HANA"
        case sapAbap = "SAP_ABAP"
        public var description: String { return self.rawValue }
    }

    public enum BackintMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case awsBackup = "AWSBackup"
        public var description: String { return self.rawValue }
    }

    public enum ClusterStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case maintenance = "MAINTENANCE"
        case none = "NONE"
        case offline = "OFFLINE"
        case online = "ONLINE"
        case standby = "STANDBY"
        public var description: String { return self.rawValue }
    }

    public enum ComponentStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case activated = "ACTIVATED"
        case running = "RUNNING"
        case runningWithError = "RUNNING_WITH_ERROR"
        case starting = "STARTING"
        case stopped = "STOPPED"
        case stopping = "STOPPING"
        case undefined = "UNDEFINED"
        public var description: String { return self.rawValue }
    }

    public enum ComponentType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case abap = "ABAP"
        case ascs = "ASCS"
        case dialog = "DIALOG"
        case ers = "ERS"
        case hana = "HANA"
        case hanaNode = "HANA_NODE"
        case wd = "WD"
        case webdisp = "WEBDISP"
        public var description: String { return self.rawValue }
    }

    public enum ConfigurationCheckOperationListingMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case allOperations = "ALL_OPERATIONS"
        case latestPerCheck = "LATEST_PER_CHECK"
        public var description: String { return self.rawValue }
    }

    public enum ConfigurationCheckType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case sapCheck01 = "SAP_CHECK_01"
        case sapCheck02 = "SAP_CHECK_02"
        case sapCheck03 = "SAP_CHECK_03"
        public var description: String { return self.rawValue }
    }

    public enum ConnectedEntityType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case dbms = "DBMS"
        public var description: String { return self.rawValue }
    }

    public enum CredentialType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case admin = "ADMIN"
        public var description: String { return self.rawValue }
    }

    public enum DatabaseConnectionMethod: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case direct = "DIRECT"
        case overlay = "OVERLAY"
        public var description: String { return self.rawValue }
    }

    public enum DatabaseStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case error = "ERROR"
        case running = "RUNNING"
        case starting = "STARTING"
        case stopped = "STOPPED"
        case unknown = "UNKNOWN"
        case warning = "WARNING"
        public var description: String { return self.rawValue }
    }

    public enum DatabaseType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case system = "SYSTEM"
        case tenant = "TENANT"
        public var description: String { return self.rawValue }
    }

    public enum FilterOperator: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case equals = "Equals"
        case greaterThanOrEquals = "GreaterThanOrEquals"
        case lessThanOrEquals = "LessThanOrEquals"
        public var description: String { return self.rawValue }
    }

    public enum HostRole: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case leader = "LEADER"
        case standby = "STANDBY"
        case unknown = "UNKNOWN"
        case worker = "WORKER"
        public var description: String { return self.rawValue }
    }

    public enum OperationEventStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum OperationMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case deltaDatashipping = "DELTA_DATASHIPPING"
        case logreplay = "LOGREPLAY"
        case logreplayReadaccess = "LOGREPLAY_READACCESS"
        case none = "NONE"
        case primary = "PRIMARY"
        public var description: String { return self.rawValue }
    }

    public enum OperationStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case error = "ERROR"
        case inprogress = "INPROGRESS"
        case success = "SUCCESS"
        public var description: String { return self.rawValue }
    }

    public enum PermissionActionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case restore = "RESTORE"
        public var description: String { return self.rawValue }
    }

    public enum ReplicationMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `async` = "ASYNC"
        case none = "NONE"
        case primary = "PRIMARY"
        case sync = "SYNC"
        case syncmem = "SYNCMEM"
        public var description: String { return self.rawValue }
    }

    public enum RuleResultStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failed = "FAILED"
        case info = "INFO"
        case passed = "PASSED"
        case unknown = "UNKNOWN"
        case warning = "WARNING"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct Application: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the Application Registry.
        public let appRegistryArn: String?
        /// The Amazon Resource Name (ARN) of the application.
        public let arn: String?
        /// The Amazon Resource Names of the associated AWS Systems Manager for SAP applications.
        public let associatedApplicationArns: [String]?
        /// The components of the application.
        public let components: [String]?
        /// The latest discovery result for the application.
        public let discoveryStatus: ApplicationDiscoveryStatus?
        /// The ID of the application.
        public let id: String?
        /// The time at which the application was last updated.
        public let lastUpdated: Date?
        /// The status of the application.
        public let status: ApplicationStatus?
        /// The status message.
        public let statusMessage: String?
        /// The type of the application.
        public let type: ApplicationType?

        @inlinable
        public init(appRegistryArn: String? = nil, arn: String? = nil, associatedApplicationArns: [String]? = nil, components: [String]? = nil, discoveryStatus: ApplicationDiscoveryStatus? = nil, id: String? = nil, lastUpdated: Date? = nil, status: ApplicationStatus? = nil, statusMessage: String? = nil, type: ApplicationType? = nil) {
            self.appRegistryArn = appRegistryArn
            self.arn = arn
            self.associatedApplicationArns = associatedApplicationArns
            self.components = components
            self.discoveryStatus = discoveryStatus
            self.id = id
            self.lastUpdated = lastUpdated
            self.status = status
            self.statusMessage = statusMessage
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case appRegistryArn = "AppRegistryArn"
            case arn = "Arn"
            case associatedApplicationArns = "AssociatedApplicationArns"
            case components = "Components"
            case discoveryStatus = "DiscoveryStatus"
            case id = "Id"
            case lastUpdated = "LastUpdated"
            case status = "Status"
            case statusMessage = "StatusMessage"
            case type = "Type"
        }
    }

    public struct ApplicationCredential: AWSEncodableShape & AWSDecodableShape {
        /// The type of the application credentials.
        public let credentialType: CredentialType
        /// The name of the SAP HANA database.
        public let databaseName: String
        /// The secret ID created in AWS Secrets Manager to store the credentials of the SAP application.
        public let secretId: String

        @inlinable
        public init(credentialType: CredentialType, databaseName: String, secretId: String) {
            self.credentialType = credentialType
            self.databaseName = databaseName
            self.secretId = secretId
        }

        public func validate(name: String) throws {
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 100)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.secretId, name: "secretId", parent: name, max: 100)
            try self.validate(self.secretId, name: "secretId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case credentialType = "CredentialType"
            case databaseName = "DatabaseName"
            case secretId = "SecretId"
        }
    }

    public struct ApplicationSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application.
        public let arn: String?
        /// The status of the latest discovery.
        public let discoveryStatus: ApplicationDiscoveryStatus?
        /// The ID of the application.
        public let id: String?
        /// The tags on the application.
        public let tags: [String: String]?
        /// The type of the application.
        public let type: ApplicationType?

        @inlinable
        public init(arn: String? = nil, discoveryStatus: ApplicationDiscoveryStatus? = nil, id: String? = nil, tags: [String: String]? = nil, type: ApplicationType? = nil) {
            self.arn = arn
            self.discoveryStatus = discoveryStatus
            self.id = id
            self.tags = tags
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case discoveryStatus = "DiscoveryStatus"
            case id = "Id"
            case tags = "Tags"
            case type = "Type"
        }
    }

    public struct AssociatedHost: AWSDecodableShape {
        /// The ID of the Amazon EC2 instance.
        public let ec2InstanceId: String?
        /// The name of the host.
        public let hostname: String?
        /// The IP addresses of the associated host.
        public let ipAddresses: [IpAddressMember]?
        /// The version of the operating system.
        public let osVersion: String?

        @inlinable
        public init(ec2InstanceId: String? = nil, hostname: String? = nil, ipAddresses: [IpAddressMember]? = nil, osVersion: String? = nil) {
            self.ec2InstanceId = ec2InstanceId
            self.hostname = hostname
            self.ipAddresses = ipAddresses
            self.osVersion = osVersion
        }

        private enum CodingKeys: String, CodingKey {
            case ec2InstanceId = "Ec2InstanceId"
            case hostname = "Hostname"
            case ipAddresses = "IpAddresses"
            case osVersion = "OsVersion"
        }
    }

    public struct BackintConfig: AWSEncodableShape {
        /// AWS service for your database backup.
        public let backintMode: BackintMode
        public let ensureNoBackupInProcess: Bool

        @inlinable
        public init(backintMode: BackintMode, ensureNoBackupInProcess: Bool) {
            self.backintMode = backintMode
            self.ensureNoBackupInProcess = ensureNoBackupInProcess
        }

        private enum CodingKeys: String, CodingKey {
            case backintMode = "BackintMode"
            case ensureNoBackupInProcess = "EnsureNoBackupInProcess"
        }
    }

    public struct Component: AWSDecodableShape {
        /// The ID of the application.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the component.
        public let arn: String?
        /// The associated host of the component.
        public let associatedHost: AssociatedHost?
        /// The child components of a highly available environment. For example, in a highly available SAP on AWS workload, the child component consists of the primary and secondar instances.
        public let childComponents: [String]?
        /// The ID of the component.
        public let componentId: String?
        /// The type of the component.
        public let componentType: ComponentType?
        /// The connection specifications for the database of the component.
        public let databaseConnection: DatabaseConnection?
        /// The SAP HANA databases of the component.
        public let databases: [String]?
        /// The SAP HANA version of the component.
        public let hdbVersion: String?
        /// The hosts of the component.
        public let hosts: [Host]?
        /// The time at which the component was last updated.
        public let lastUpdated: Date?
        /// The parent component of a highly available environment. For example, in a highly available SAP on AWS workload, the parent component consists of the entire setup, including the child components.
        public let parentComponent: String?
        /// The primary host of the component.
        public let primaryHost: String?
        /// Details of the SAP HANA system replication for the component.
        public let resilience: Resilience?
        /// The SAP feature of the component.
        public let sapFeature: String?
        /// The hostname of the component.
        public let sapHostname: String?
        /// The kernel version of the component.
        public let sapKernelVersion: String?
        /// The SAP System Identifier of the application component.
        public let sid: String?
        /// The status of the component.   ACTIVATED - this status has been deprecated.   STARTING - the component is in the process of being started.   STOPPED - the component is not running.   STOPPING - the component is in the process of being stopped.   RUNNING - the component is running.   RUNNING_WITH_ERROR - one or more child component(s) of the parent component is not running. Call  GetComponent  to review the status of each child component.   UNDEFINED - AWS Systems Manager for SAP cannot provide the component status based on the discovered information. Verify your SAP application.
        public let status: ComponentStatus?
        /// The SAP system number of the application component.
        public let systemNumber: String?

        @inlinable
        public init(applicationId: String? = nil, arn: String? = nil, associatedHost: AssociatedHost? = nil, childComponents: [String]? = nil, componentId: String? = nil, componentType: ComponentType? = nil, databaseConnection: DatabaseConnection? = nil, databases: [String]? = nil, hdbVersion: String? = nil, lastUpdated: Date? = nil, parentComponent: String? = nil, resilience: Resilience? = nil, sapFeature: String? = nil, sapHostname: String? = nil, sapKernelVersion: String? = nil, sid: String? = nil, status: ComponentStatus? = nil, systemNumber: String? = nil) {
            self.applicationId = applicationId
            self.arn = arn
            self.associatedHost = associatedHost
            self.childComponents = childComponents
            self.componentId = componentId
            self.componentType = componentType
            self.databaseConnection = databaseConnection
            self.databases = databases
            self.hdbVersion = hdbVersion
            self.hosts = nil
            self.lastUpdated = lastUpdated
            self.parentComponent = parentComponent
            self.primaryHost = nil
            self.resilience = resilience
            self.sapFeature = sapFeature
            self.sapHostname = sapHostname
            self.sapKernelVersion = sapKernelVersion
            self.sid = sid
            self.status = status
            self.systemNumber = systemNumber
        }

        @available(*, deprecated, message: "Members hosts, primaryHost have been deprecated")
        @inlinable
        public init(applicationId: String? = nil, arn: String? = nil, associatedHost: AssociatedHost? = nil, childComponents: [String]? = nil, componentId: String? = nil, componentType: ComponentType? = nil, databaseConnection: DatabaseConnection? = nil, databases: [String]? = nil, hdbVersion: String? = nil, hosts: [Host]? = nil, lastUpdated: Date? = nil, parentComponent: String? = nil, primaryHost: String? = nil, resilience: Resilience? = nil, sapFeature: String? = nil, sapHostname: String? = nil, sapKernelVersion: String? = nil, sid: String? = nil, status: ComponentStatus? = nil, systemNumber: String? = nil) {
            self.applicationId = applicationId
            self.arn = arn
            self.associatedHost = associatedHost
            self.childComponents = childComponents
            self.componentId = componentId
            self.componentType = componentType
            self.databaseConnection = databaseConnection
            self.databases = databases
            self.hdbVersion = hdbVersion
            self.hosts = hosts
            self.lastUpdated = lastUpdated
            self.parentComponent = parentComponent
            self.primaryHost = primaryHost
            self.resilience = resilience
            self.sapFeature = sapFeature
            self.sapHostname = sapHostname
            self.sapKernelVersion = sapKernelVersion
            self.sid = sid
            self.status = status
            self.systemNumber = systemNumber
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case associatedHost = "AssociatedHost"
            case childComponents = "ChildComponents"
            case componentId = "ComponentId"
            case componentType = "ComponentType"
            case databaseConnection = "DatabaseConnection"
            case databases = "Databases"
            case hdbVersion = "HdbVersion"
            case hosts = "Hosts"
            case lastUpdated = "LastUpdated"
            case parentComponent = "ParentComponent"
            case primaryHost = "PrimaryHost"
            case resilience = "Resilience"
            case sapFeature = "SapFeature"
            case sapHostname = "SapHostname"
            case sapKernelVersion = "SapKernelVersion"
            case sid = "Sid"
            case status = "Status"
            case systemNumber = "SystemNumber"
        }
    }

    public struct ComponentInfo: AWSEncodableShape {
        /// This string is the type of the component. Accepted value is WD.
        public let componentType: ComponentType
        /// This is the Amazon EC2 instance on which your SAP component is running. Accepted values are alphanumeric.
        public let ec2InstanceId: String
        /// This string is the SAP System ID of the component. Accepted values are alphanumeric.
        public let sid: String

        @inlinable
        public init(componentType: ComponentType, ec2InstanceId: String, sid: String) {
            self.componentType = componentType
            self.ec2InstanceId = ec2InstanceId
            self.sid = sid
        }

        public func validate(name: String) throws {
            try self.validate(self.ec2InstanceId, name: "ec2InstanceId", parent: name, pattern: "^i-[\\w\\d]{8}$|^i-[\\w\\d]{17}$")
            try self.validate(self.sid, name: "sid", parent: name, pattern: "^[A-Z][A-Z0-9]{2}$")
        }

        private enum CodingKeys: String, CodingKey {
            case componentType = "ComponentType"
            case ec2InstanceId = "Ec2InstanceId"
            case sid = "Sid"
        }
    }

    public struct ComponentSummary: AWSDecodableShape {
        /// The ID of the application.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the component summary.
        public let arn: String?
        /// The ID of the component.
        public let componentId: String?
        /// The type of the component.
        public let componentType: ComponentType?
        /// The tags of the component.
        public let tags: [String: String]?

        @inlinable
        public init(applicationId: String? = nil, arn: String? = nil, componentId: String? = nil, componentType: ComponentType? = nil, tags: [String: String]? = nil) {
            self.applicationId = applicationId
            self.arn = arn
            self.componentId = componentId
            self.componentType = componentType
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case componentId = "ComponentId"
            case componentType = "ComponentType"
            case tags = "Tags"
        }
    }

    public struct ConfigurationCheckDefinition: AWSDecodableShape {
        /// The list of SSMSAP application types that this configuration check can be evaluated against.
        public let applicableApplicationTypes: [ApplicationType]?
        /// A description of what the configuration check validates.
        public let description: String?
        /// The unique identifier of the configuration check.
        public let id: ConfigurationCheckType?
        /// The name of the configuration check.
        public let name: String?

        @inlinable
        public init(applicableApplicationTypes: [ApplicationType]? = nil, description: String? = nil, id: ConfigurationCheckType? = nil, name: String? = nil) {
            self.applicableApplicationTypes = applicableApplicationTypes
            self.description = description
            self.id = id
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case applicableApplicationTypes = "ApplicableApplicationTypes"
            case description = "Description"
            case id = "Id"
            case name = "Name"
        }
    }

    public struct ConfigurationCheckOperation: AWSDecodableShape {
        /// The ID of the application against which the configuration check was performed.
        public let applicationId: String?
        /// A description of the configuration check that was performed.
        public let configurationCheckDescription: String?
        /// The unique identifier of the configuration check that was performed.
        public let configurationCheckId: ConfigurationCheckType?
        /// The name of the configuration check that was performed.
        public let configurationCheckName: String?
        /// The time at which the configuration check operation completed.
        public let endTime: Date?
        /// The unique identifier of the configuration check operation.
        public let id: String?
        /// A summary of all the rule results, showing counts for each status type.
        public let ruleStatusCounts: RuleStatusCounts?
        /// The time at which the configuration check operation started.
        public let startTime: Date?
        /// The current status of the configuration check operation.
        public let status: OperationStatus?
        /// A message providing additional details about the status of the configuration check operation.
        public let statusMessage: String?

        @inlinable
        public init(applicationId: String? = nil, configurationCheckDescription: String? = nil, configurationCheckId: ConfigurationCheckType? = nil, configurationCheckName: String? = nil, endTime: Date? = nil, id: String? = nil, ruleStatusCounts: RuleStatusCounts? = nil, startTime: Date? = nil, status: OperationStatus? = nil, statusMessage: String? = nil) {
            self.applicationId = applicationId
            self.configurationCheckDescription = configurationCheckDescription
            self.configurationCheckId = configurationCheckId
            self.configurationCheckName = configurationCheckName
            self.endTime = endTime
            self.id = id
            self.ruleStatusCounts = ruleStatusCounts
            self.startTime = startTime
            self.status = status
            self.statusMessage = statusMessage
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case configurationCheckDescription = "ConfigurationCheckDescription"
            case configurationCheckId = "ConfigurationCheckId"
            case configurationCheckName = "ConfigurationCheckName"
            case endTime = "EndTime"
            case id = "Id"
            case ruleStatusCounts = "RuleStatusCounts"
            case startTime = "StartTime"
            case status = "Status"
            case statusMessage = "StatusMessage"
        }
    }

    public struct Database: AWSDecodableShape {
        /// The ID of the application.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the database.
        public let arn: String?
        /// The ID of the component.
        public let componentId: String?
        /// The Amazon Resource Names of the connected AWS Systems Manager for SAP components.
        public let connectedComponentArns: [String]?
        /// The credentials of the database.
        public let credentials: [ApplicationCredential]?
        /// The ID of the SAP HANA database.
        public let databaseId: String?
        /// The name of the database.
        public let databaseName: String?
        /// The type of the database.
        public let databaseType: DatabaseType?
        /// The time at which the database was last updated.
        public let lastUpdated: Date?
        /// The primary host of the database.
        public let primaryHost: String?
        /// The SQL port of the database.
        public let sqlPort: Int?
        /// The status of the database.
        public let status: DatabaseStatus?

        @inlinable
        public init(applicationId: String? = nil, arn: String? = nil, componentId: String? = nil, connectedComponentArns: [String]? = nil, credentials: [ApplicationCredential]? = nil, databaseId: String? = nil, databaseName: String? = nil, databaseType: DatabaseType? = nil, lastUpdated: Date? = nil, primaryHost: String? = nil, sqlPort: Int? = nil, status: DatabaseStatus? = nil) {
            self.applicationId = applicationId
            self.arn = arn
            self.componentId = componentId
            self.connectedComponentArns = connectedComponentArns
            self.credentials = credentials
            self.databaseId = databaseId
            self.databaseName = databaseName
            self.databaseType = databaseType
            self.lastUpdated = lastUpdated
            self.primaryHost = primaryHost
            self.sqlPort = sqlPort
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case componentId = "ComponentId"
            case connectedComponentArns = "ConnectedComponentArns"
            case credentials = "Credentials"
            case databaseId = "DatabaseId"
            case databaseName = "DatabaseName"
            case databaseType = "DatabaseType"
            case lastUpdated = "LastUpdated"
            case primaryHost = "PrimaryHost"
            case sqlPort = "SQLPort"
            case status = "Status"
        }
    }

    public struct DatabaseConnection: AWSDecodableShape {
        /// The IP address for connection.
        public let connectionIp: String?
        /// The Amazon Resource Name of the connected SAP HANA database.
        public let databaseArn: String?
        /// The method of connection.
        public let databaseConnectionMethod: DatabaseConnectionMethod?

        @inlinable
        public init(connectionIp: String? = nil, databaseArn: String? = nil, databaseConnectionMethod: DatabaseConnectionMethod? = nil) {
            self.connectionIp = connectionIp
            self.databaseArn = databaseArn
            self.databaseConnectionMethod = databaseConnectionMethod
        }

        private enum CodingKeys: String, CodingKey {
            case connectionIp = "ConnectionIp"
            case databaseArn = "DatabaseArn"
            case databaseConnectionMethod = "DatabaseConnectionMethod"
        }
    }

    public struct DatabaseSummary: AWSDecodableShape {
        /// The ID of the application.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the database.
        public let arn: String?
        /// The ID of the component.
        public let componentId: String?
        /// The ID of the database.
        public let databaseId: String?
        /// The type of the database.
        public let databaseType: DatabaseType?
        /// The tags of the database.
        public let tags: [String: String]?

        @inlinable
        public init(applicationId: String? = nil, arn: String? = nil, componentId: String? = nil, databaseId: String? = nil, databaseType: DatabaseType? = nil, tags: [String: String]? = nil) {
            self.applicationId = applicationId
            self.arn = arn
            self.componentId = componentId
            self.databaseId = databaseId
            self.databaseType = databaseType
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case componentId = "ComponentId"
            case databaseId = "DatabaseId"
            case databaseType = "DatabaseType"
            case tags = "Tags"
        }
    }

    public struct DeleteResourcePermissionInput: AWSEncodableShape {
        /// Delete or restore the permissions on the target database.
        public let actionType: PermissionActionType?
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String
        /// The Amazon Resource Name (ARN) of the source resource.
        public let sourceResourceArn: String?

        @inlinable
        public init(actionType: PermissionActionType? = nil, resourceArn: String, sourceResourceArn: String? = nil) {
            self.actionType = actionType
            self.resourceArn = resourceArn
            self.sourceResourceArn = sourceResourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(.+:){2,4}.+$|^arn:(.+:){1,3}.+\\/.+$")
            try self.validate(self.sourceResourceArn, name: "sourceResourceArn", parent: name, pattern: "^arn:(.+:){2,4}.+$|^arn:(.+:){1,3}.+\\/.+$")
        }

        private enum CodingKeys: String, CodingKey {
            case actionType = "ActionType"
            case resourceArn = "ResourceArn"
            case sourceResourceArn = "SourceResourceArn"
        }
    }

    public struct DeleteResourcePermissionOutput: AWSDecodableShape {
        /// The policy that removes permissions on the target database.
        public let policy: String?

        @inlinable
        public init(policy: String? = nil) {
            self.policy = policy
        }

        private enum CodingKeys: String, CodingKey {
            case policy = "Policy"
        }
    }

    public struct DeregisterApplicationInput: AWSEncodableShape {
        /// The ID of the application.
        public let applicationId: String

        @inlinable
        public init(applicationId: String) {
            self.applicationId = applicationId
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 60)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\w\\d\\.-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
        }
    }

    public struct DeregisterApplicationOutput: AWSDecodableShape {
        public init() {}
    }

    public struct Filter: AWSEncodableShape {
        /// The name of the filter. Filter names are case-sensitive.
        public let name: String
        /// The operator for the filter.
        public let `operator`: FilterOperator
        /// The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values
        public let value: String

        @inlinable
        public init(name: String, operator: FilterOperator, value: String) {
            self.name = name
            self.`operator` = `operator`
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 32)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 64)
            try self.validate(self.value, name: "value", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case `operator` = "Operator"
            case value = "Value"
        }
    }

    public struct GetApplicationInput: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application.
        public let applicationArn: String?
        /// The ID of the application.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the application registry.
        public let appRegistryArn: String?

        @inlinable
        public init(applicationArn: String? = nil, applicationId: String? = nil, appRegistryArn: String? = nil) {
            self.applicationArn = applicationArn
            self.applicationId = applicationId
            self.appRegistryArn = appRegistryArn
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationArn, name: "applicationArn", parent: name, pattern: "^arn:(.+:){2,4}.+$|^arn:(.+:){1,3}.+\\/.+$")
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 60)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\w\\d\\.-]+$")
            try self.validate(self.appRegistryArn, name: "appRegistryArn", parent: name, pattern: "^arn:aws:servicecatalog:[a-z0-9:\\/-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn = "ApplicationArn"
            case applicationId = "ApplicationId"
            case appRegistryArn = "AppRegistryArn"
        }
    }

    public struct GetApplicationOutput: AWSDecodableShape {
        /// Returns all of the metadata of an application registered with AWS Systems Manager for SAP.
        public let application: Application?
        /// The tags of a registered application.
        public let tags: [String: String]?

        @inlinable
        public init(application: Application? = nil, tags: [String: String]? = nil) {
            self.application = application
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case application = "Application"
            case tags = "Tags"
        }
    }

    public struct GetComponentInput: AWSEncodableShape {
        /// The ID of the application.
        public let applicationId: String
        /// The ID of the component.
        public let componentId: String

        @inlinable
        public init(applicationId: String, componentId: String) {
            self.applicationId = applicationId
            self.componentId = componentId
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 60)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\w\\d\\.-]+$")
            try self.validate(self.componentId, name: "componentId", parent: name, max: 100)
            try self.validate(self.componentId, name: "componentId", parent: name, min: 1)
            try self.validate(self.componentId, name: "componentId", parent: name, pattern: "^[\\w\\d-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case componentId = "ComponentId"
        }
    }

    public struct GetComponentOutput: AWSDecodableShape {
        /// The component of an application registered with AWS Systems Manager for SAP.
        public let component: Component?
        /// The tags of a component.
        public let tags: [String: String]?

        @inlinable
        public init(component: Component? = nil, tags: [String: String]? = nil) {
            self.component = component
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case component = "Component"
            case tags = "Tags"
        }
    }

    public struct GetConfigurationCheckOperationInput: AWSEncodableShape {
        /// The ID of the configuration check operation.
        public let operationId: String

        @inlinable
        public init(operationId: String) {
            self.operationId = operationId
        }

        public func validate(name: String) throws {
            try self.validate(self.operationId, name: "operationId", parent: name, pattern: "^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$")
        }

        private enum CodingKeys: String, CodingKey {
            case operationId = "OperationId"
        }
    }

    public struct GetConfigurationCheckOperationOutput: AWSDecodableShape {
        /// Returns the details of a configuration check operation.
        public let configurationCheckOperation: ConfigurationCheckOperation?

        @inlinable
        public init(configurationCheckOperation: ConfigurationCheckOperation? = nil) {
            self.configurationCheckOperation = configurationCheckOperation
        }

        private enum CodingKeys: String, CodingKey {
            case configurationCheckOperation = "ConfigurationCheckOperation"
        }
    }

    public struct GetDatabaseInput: AWSEncodableShape {
        /// The ID of the application.
        public let applicationId: String?
        /// The ID of the component.
        public let componentId: String?
        /// The Amazon Resource Name (ARN) of the database.
        public let databaseArn: String?
        /// The ID of the database.
        public let databaseId: String?

        @inlinable
        public init(applicationId: String? = nil, componentId: String? = nil, databaseArn: String? = nil, databaseId: String? = nil) {
            self.applicationId = applicationId
            self.componentId = componentId
            self.databaseArn = databaseArn
            self.databaseId = databaseId
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 60)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\w\\d\\.-]+$")
            try self.validate(self.componentId, name: "componentId", parent: name, max: 100)
            try self.validate(self.componentId, name: "componentId", parent: name, min: 1)
            try self.validate(self.componentId, name: "componentId", parent: name, pattern: "^[\\w\\d-]+$")
            try self.validate(self.databaseArn, name: "databaseArn", parent: name, pattern: "^arn:(.+:){2,4}.+$|^arn:(.+:){1,3}.+\\/.+$")
            try self.validate(self.databaseId, name: "databaseId", parent: name, max: 300)
            try self.validate(self.databaseId, name: "databaseId", parent: name, min: 1)
            try self.validate(self.databaseId, name: "databaseId", parent: name, pattern: "[\\w\\d]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case componentId = "ComponentId"
            case databaseArn = "DatabaseArn"
            case databaseId = "DatabaseId"
        }
    }

    public struct GetDatabaseOutput: AWSDecodableShape {
        /// The SAP HANA database of an application registered with AWS Systems Manager for SAP.
        public let database: Database?
        /// The tags of a database.
        public let tags: [String: String]?

        @inlinable
        public init(database: Database? = nil, tags: [String: String]? = nil) {
            self.database = database
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case database = "Database"
            case tags = "Tags"
        }
    }

    public struct GetOperationInput: AWSEncodableShape {
        /// The ID of the operation.
        public let operationId: String

        @inlinable
        public init(operationId: String) {
            self.operationId = operationId
        }

        public func validate(name: String) throws {
            try self.validate(self.operationId, name: "operationId", parent: name, pattern: "^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$")
        }

        private enum CodingKeys: String, CodingKey {
            case operationId = "OperationId"
        }
    }

    public struct GetOperationOutput: AWSDecodableShape {
        /// Returns the details of an operation.
        public let operation: Operation?

        @inlinable
        public init(operation: Operation? = nil) {
            self.operation = operation
        }

        private enum CodingKeys: String, CodingKey {
            case operation = "Operation"
        }
    }

    public struct GetResourcePermissionInput: AWSEncodableShape {
        public let actionType: PermissionActionType?
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String

        @inlinable
        public init(actionType: PermissionActionType? = nil, resourceArn: String) {
            self.actionType = actionType
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(.+:){2,4}.+$|^arn:(.+:){1,3}.+\\/.+$")
        }

        private enum CodingKeys: String, CodingKey {
            case actionType = "ActionType"
            case resourceArn = "ResourceArn"
        }
    }

    public struct GetResourcePermissionOutput: AWSDecodableShape {
        public let policy: String?

        @inlinable
        public init(policy: String? = nil) {
            self.policy = policy
        }

        private enum CodingKeys: String, CodingKey {
            case policy = "Policy"
        }
    }

    public struct Host: AWSDecodableShape {
        /// The ID of Amazon EC2 instance.
        public let ec2InstanceId: String?
        /// The IP address of the Dedicated Host.
        public let hostIp: String?
        /// The name of the Dedicated Host.
        public let hostName: String?
        /// The role of the Dedicated Host.
        public let hostRole: HostRole?
        /// The instance ID of the instance on the Dedicated Host.
        public let instanceId: String?
        /// The version of the operating system.
        public let osVersion: String?

        @inlinable
        public init(ec2InstanceId: String? = nil, hostIp: String? = nil, hostName: String? = nil, hostRole: HostRole? = nil, instanceId: String? = nil, osVersion: String? = nil) {
            self.ec2InstanceId = ec2InstanceId
            self.hostIp = hostIp
            self.hostName = hostName
            self.hostRole = hostRole
            self.instanceId = instanceId
            self.osVersion = osVersion
        }

        private enum CodingKeys: String, CodingKey {
            case ec2InstanceId = "EC2InstanceId"
            case hostIp = "HostIp"
            case hostName = "HostName"
            case hostRole = "HostRole"
            case instanceId = "InstanceId"
            case osVersion = "OsVersion"
        }
    }

    public struct IpAddressMember: AWSDecodableShape {
        /// The type of allocation for the IP address.
        public let allocationType: AllocationType?
        /// The IP address.
        public let ipAddress: String?
        /// The primary IP address.
        public let primary: Bool?

        @inlinable
        public init(allocationType: AllocationType? = nil, ipAddress: String? = nil, primary: Bool? = nil) {
            self.allocationType = allocationType
            self.ipAddress = ipAddress
            self.primary = primary
        }

        private enum CodingKeys: String, CodingKey {
            case allocationType = "AllocationType"
            case ipAddress = "IpAddress"
            case primary = "Primary"
        }
    }

    public struct ListApplicationsInput: AWSEncodableShape {
        /// The filter of name, value, and operator.
        public let filters: [Filter]?
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(filters: [Filter]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 10)
            try self.validate(self.filters, name: "filters", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^.{16,2048}$")
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListApplicationsOutput: AWSDecodableShape {
        /// The applications registered with AWS Systems Manager for SAP.
        public let applications: [ApplicationSummary]?
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?

        @inlinable
        public init(applications: [ApplicationSummary]? = nil, nextToken: String? = nil) {
            self.applications = applications
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case applications = "Applications"
            case nextToken = "NextToken"
        }
    }

    public struct ListComponentsInput: AWSEncodableShape {
        /// The ID of the application.
        public let applicationId: String?
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. If you do not specify a value for MaxResults, the request returns 50 items per page by default.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(applicationId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.applicationId = applicationId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 60)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\w\\d\\.-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^.{16,2048}$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListComponentsOutput: AWSDecodableShape {
        /// List of components registered with AWS System Manager for SAP.
        public let components: [ComponentSummary]?
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?

        @inlinable
        public init(components: [ComponentSummary]? = nil, nextToken: String? = nil) {
            self.components = components
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case components = "Components"
            case nextToken = "NextToken"
        }
    }

    public struct ListConfigurationCheckDefinitionsInput: AWSEncodableShape {
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^.{16,2048}$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListConfigurationCheckDefinitionsOutput: AWSDecodableShape {
        /// The configuration check types supported by AWS Systems Manager for SAP.
        public let configurationChecks: [ConfigurationCheckDefinition]?
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?

        @inlinable
        public init(configurationChecks: [ConfigurationCheckDefinition]? = nil, nextToken: String? = nil) {
            self.configurationChecks = configurationChecks
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case configurationChecks = "ConfigurationChecks"
            case nextToken = "NextToken"
        }
    }

    public struct ListConfigurationCheckOperationsInput: AWSEncodableShape {
        /// The ID of the application.
        public let applicationId: String
        /// The filters of an operation.
        public let filters: [Filter]?
        /// The mode for listing configuration check operations. Defaults to "LATEST_PER_CHECK".   LATEST_PER_CHECK - Will list the latest configuration check operation per check type.   ALL_OPERATIONS - Will list all configuration check operations performed on the application.
        public let listMode: ConfigurationCheckOperationListingMode?
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(applicationId: String, filters: [Filter]? = nil, listMode: ConfigurationCheckOperationListingMode? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.applicationId = applicationId
            self.filters = filters
            self.listMode = listMode
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 60)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\w\\d\\.-]+$")
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 10)
            try self.validate(self.filters, name: "filters", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^.{16,2048}$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case filters = "Filters"
            case listMode = "ListMode"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListConfigurationCheckOperationsOutput: AWSDecodableShape {
        /// The configuration check operations performed by AWS Systems Manager for SAP.
        public let configurationCheckOperations: [ConfigurationCheckOperation]?
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?

        @inlinable
        public init(configurationCheckOperations: [ConfigurationCheckOperation]? = nil, nextToken: String? = nil) {
            self.configurationCheckOperations = configurationCheckOperations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case configurationCheckOperations = "ConfigurationCheckOperations"
            case nextToken = "NextToken"
        }
    }

    public struct ListDatabasesInput: AWSEncodableShape {
        /// The ID of the application.
        public let applicationId: String?
        /// The ID of the component.
        public let componentId: String?
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. If you do not specify a value for MaxResults, the request returns 50 items per page by default.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(applicationId: String? = nil, componentId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.applicationId = applicationId
            self.componentId = componentId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 60)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\w\\d\\.-]+$")
            try self.validate(self.componentId, name: "componentId", parent: name, max: 100)
            try self.validate(self.componentId, name: "componentId", parent: name, min: 1)
            try self.validate(self.componentId, name: "componentId", parent: name, pattern: "^[\\w\\d-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^.{16,2048}$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case componentId = "ComponentId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListDatabasesOutput: AWSDecodableShape {
        /// The SAP HANA databases of an application.
        public let databases: [DatabaseSummary]?
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?

        @inlinable
        public init(databases: [DatabaseSummary]? = nil, nextToken: String? = nil) {
            self.databases = databases
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case databases = "Databases"
            case nextToken = "NextToken"
        }
    }

    public struct ListOperationEventsInput: AWSEncodableShape {
        /// Optionally specify filters to narrow the returned operation event items. Valid filter names include status, resourceID, and resourceType. The valid operator for all three filters is Equals.
        public let filters: [Filter]?
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. If you do not specify a value for MaxResults, the request returns 50 items per page by default.
        public let maxResults: Int?
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// The ID of the operation.
        public let operationId: String

        @inlinable
        public init(filters: [Filter]? = nil, maxResults: Int? = nil, nextToken: String? = nil, operationId: String) {
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.operationId = operationId
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 10)
            try self.validate(self.filters, name: "filters", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^.{16,2048}$")
            try self.validate(self.operationId, name: "operationId", parent: name, pattern: "^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$")
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case operationId = "OperationId"
        }
    }

    public struct ListOperationEventsOutput: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// A returned list of operation events that meet the filter criteria.
        public let operationEvents: [OperationEvent]?

        @inlinable
        public init(nextToken: String? = nil, operationEvents: [OperationEvent]? = nil) {
            self.nextToken = nextToken
            self.operationEvents = operationEvents
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case operationEvents = "OperationEvents"
        }
    }

    public struct ListOperationsInput: AWSEncodableShape {
        /// The ID of the application.
        public let applicationId: String
        /// The filters of an operation.
        public let filters: [Filter]?
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. If you do not specify a value for MaxResults, the request returns 50 items per page by default.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(applicationId: String, filters: [Filter]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.applicationId = applicationId
            self.filters = filters
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 60)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\w\\d\\.-]+$")
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 10)
            try self.validate(self.filters, name: "filters", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^.{16,2048}$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case filters = "Filters"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListOperationsOutput: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// List of operations performed by AWS Systems Manager for SAP.
        public let operations: [Operation]?

        @inlinable
        public init(nextToken: String? = nil, operations: [Operation]? = nil) {
            self.nextToken = nextToken
            self.operations = operations
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case operations = "Operations"
        }
    }

    public struct ListSubCheckResultsInput: AWSEncodableShape {
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?
        /// The ID of the configuration check operation.
        public let operationId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, operationId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.operationId = operationId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^.{16,2048}$")
            try self.validate(self.operationId, name: "operationId", parent: name, pattern: "^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case operationId = "OperationId"
        }
    }

    public struct ListSubCheckResultsOutput: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// The sub-check results of a configuration check operation.
        public let subCheckResults: [SubCheckResult]?

        @inlinable
        public init(nextToken: String? = nil, subCheckResults: [SubCheckResult]? = nil) {
            self.nextToken = nextToken
            self.subCheckResults = subCheckResults
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case subCheckResults = "SubCheckResults"
        }
    }

    public struct ListSubCheckRuleResultsInput: AWSEncodableShape {
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?
        /// The ID of the sub check result.
        public let subCheckResultId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, subCheckResultId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.subCheckResultId = subCheckResultId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 50)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^.{16,2048}$")
            try self.validate(self.subCheckResultId, name: "subCheckResultId", parent: name, pattern: "^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case subCheckResultId = "SubCheckResultId"
        }
    }

    public struct ListSubCheckRuleResultsOutput: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// The rule results of a sub-check belonging to a configuration check operation.
        public let ruleResults: [RuleResult]?

        @inlinable
        public init(nextToken: String? = nil, ruleResults: [RuleResult]? = nil) {
            self.nextToken = nextToken
            self.ruleResults = ruleResults
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case ruleResults = "RuleResults"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String

        @inlinable
        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(.+:){2,4}.+$|^arn:(.+:){1,3}.+\\/.+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        public let tags: [String: String]?

        @inlinable
        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct Operation: AWSDecodableShape {
        /// The end time of the operation.
        public let endTime: Date?
        /// The ID of the operation.
        public let id: String?
        /// The time at which the operation was last updated.
        public let lastUpdatedTime: Date?
        /// The properties of the operation.
        public let properties: [String: String]?
        /// The Amazon Resource Name (ARN) of the operation.
        public let resourceArn: String?
        /// The resource ID of the operation.
        public let resourceId: String?
        /// The resource type of the operation.
        public let resourceType: String?
        /// The start time of the operation.
        public let startTime: Date?
        /// The status of the operation.
        public let status: OperationStatus?
        /// The status message of the operation.
        public let statusMessage: String?
        /// The type of the operation.
        public let type: String?

        @inlinable
        public init(endTime: Date? = nil, id: String? = nil, lastUpdatedTime: Date? = nil, properties: [String: String]? = nil, resourceArn: String? = nil, resourceId: String? = nil, resourceType: String? = nil, startTime: Date? = nil, status: OperationStatus? = nil, statusMessage: String? = nil, type: String? = nil) {
            self.endTime = endTime
            self.id = id
            self.lastUpdatedTime = lastUpdatedTime
            self.properties = properties
            self.resourceArn = resourceArn
            self.resourceId = resourceId
            self.resourceType = resourceType
            self.startTime = startTime
            self.status = status
            self.statusMessage = statusMessage
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "EndTime"
            case id = "Id"
            case lastUpdatedTime = "LastUpdatedTime"
            case properties = "Properties"
            case resourceArn = "ResourceArn"
            case resourceId = "ResourceId"
            case resourceType = "ResourceType"
            case startTime = "StartTime"
            case status = "Status"
            case statusMessage = "StatusMessage"
            case type = "Type"
        }
    }

    public struct OperationEvent: AWSDecodableShape {
        /// A description of the operation event. For example, "Stop the EC2 instance i-abcdefgh987654321".
        public let description: String?
        /// The resource involved in the operations event. Contains ResourceArn ARN and ResourceType.
        public let resource: Resource?
        /// The status of the operation event. The possible statuses are: IN_PROGRESS, COMPLETED, and FAILED.
        public let status: OperationEventStatus?
        /// The status message relating to a specific operation event.
        public let statusMessage: String?
        /// The timestamp of the specified operation event.
        public let timestamp: Date?

        @inlinable
        public init(description: String? = nil, resource: Resource? = nil, status: OperationEventStatus? = nil, statusMessage: String? = nil, timestamp: Date? = nil) {
            self.description = description
            self.resource = resource
            self.status = status
            self.statusMessage = statusMessage
            self.timestamp = timestamp
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case resource = "Resource"
            case status = "Status"
            case statusMessage = "StatusMessage"
            case timestamp = "Timestamp"
        }
    }

    public struct PutResourcePermissionInput: AWSEncodableShape {
        public let actionType: PermissionActionType
        public let resourceArn: String
        public let sourceResourceArn: String

        @inlinable
        public init(actionType: PermissionActionType, resourceArn: String, sourceResourceArn: String) {
            self.actionType = actionType
            self.resourceArn = resourceArn
            self.sourceResourceArn = sourceResourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(.+:){2,4}.+$|^arn:(.+:){1,3}.+\\/.+$")
            try self.validate(self.sourceResourceArn, name: "sourceResourceArn", parent: name, pattern: "^arn:(.+:){2,4}.+$|^arn:(.+:){1,3}.+\\/.+$")
        }

        private enum CodingKeys: String, CodingKey {
            case actionType = "ActionType"
            case resourceArn = "ResourceArn"
            case sourceResourceArn = "SourceResourceArn"
        }
    }

    public struct PutResourcePermissionOutput: AWSDecodableShape {
        public let policy: String?

        @inlinable
        public init(policy: String? = nil) {
            self.policy = policy
        }

        private enum CodingKeys: String, CodingKey {
            case policy = "Policy"
        }
    }

    public struct RegisterApplicationInput: AWSEncodableShape {
        /// The ID of the application.
        public let applicationId: String
        /// The type of the application.
        public let applicationType: ApplicationType
        /// This is an optional parameter for component details to which the SAP ABAP application is attached, such as Web Dispatcher. This is an array of ApplicationComponent objects. You may input 0 to 5 items.
        public let componentsInfo: [ComponentInfo]?
        /// The credentials of the SAP application.
        public let credentials: [ApplicationCredential]?
        /// The Amazon Resource Name of the SAP HANA database.
        public let databaseArn: String?
        /// The Amazon EC2 instances on which your SAP application is running.
        public let instances: [String]
        /// The SAP instance number of the application.
        public let sapInstanceNumber: String?
        /// The System ID of the application.
        public let sid: String?
        /// The tags to be attached to the SAP application.
        public let tags: [String: String]?

        @inlinable
        public init(applicationId: String, applicationType: ApplicationType, componentsInfo: [ComponentInfo]? = nil, credentials: [ApplicationCredential]? = nil, databaseArn: String? = nil, instances: [String], sapInstanceNumber: String? = nil, sid: String? = nil, tags: [String: String]? = nil) {
            self.applicationId = applicationId
            self.applicationType = applicationType
            self.componentsInfo = componentsInfo
            self.credentials = credentials
            self.databaseArn = databaseArn
            self.instances = instances
            self.sapInstanceNumber = sapInstanceNumber
            self.sid = sid
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 60)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\w\\d\\.-]+$")
            try self.componentsInfo?.forEach {
                try $0.validate(name: "\(name).componentsInfo[]")
            }
            try self.validate(self.componentsInfo, name: "componentsInfo", parent: name, max: 5)
            try self.credentials?.forEach {
                try $0.validate(name: "\(name).credentials[]")
            }
            try self.validate(self.credentials, name: "credentials", parent: name, max: 20)
            try self.validate(self.databaseArn, name: "databaseArn", parent: name, pattern: "^arn:(.+:){2,4}.+$|^arn:(.+:){1,3}.+\\/.+$")
            try self.instances.forEach {
                try validate($0, name: "instances[]", parent: name, pattern: "^i-[\\w\\d]{8}$|^i-[\\w\\d]{17}$")
            }
            try self.validate(self.instances, name: "instances", parent: name, max: 1)
            try self.validate(self.instances, name: "instances", parent: name, min: 1)
            try self.validate(self.sapInstanceNumber, name: "sapInstanceNumber", parent: name, pattern: "^[0-9]{2}$")
            try self.validate(self.sid, name: "sid", parent: name, pattern: "^[A-Z][A-Z0-9]{2}$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case applicationType = "ApplicationType"
            case componentsInfo = "ComponentsInfo"
            case credentials = "Credentials"
            case databaseArn = "DatabaseArn"
            case instances = "Instances"
            case sapInstanceNumber = "SapInstanceNumber"
            case sid = "Sid"
            case tags = "Tags"
        }
    }

    public struct RegisterApplicationOutput: AWSDecodableShape {
        /// The application registered with AWS Systems Manager for SAP.
        public let application: Application?
        /// The ID of the operation.
        public let operationId: String?

        @inlinable
        public init(application: Application? = nil, operationId: String? = nil) {
            self.application = application
            self.operationId = operationId
        }

        private enum CodingKeys: String, CodingKey {
            case application = "Application"
            case operationId = "OperationId"
        }
    }

    public struct Resilience: AWSDecodableShape {
        /// The cluster status of the component.
        public let clusterStatus: ClusterStatus?
        /// Indicates if or not enqueue replication is enabled for the ASCS component.
        public let enqueueReplication: Bool?
        /// The operation mode of the component.
        public let hsrOperationMode: OperationMode?
        /// The replication mode of the component.
        public let hsrReplicationMode: ReplicationMode?
        /// The tier of the component.
        public let hsrTier: String?

        @inlinable
        public init(clusterStatus: ClusterStatus? = nil, enqueueReplication: Bool? = nil, hsrOperationMode: OperationMode? = nil, hsrReplicationMode: ReplicationMode? = nil, hsrTier: String? = nil) {
            self.clusterStatus = clusterStatus
            self.enqueueReplication = enqueueReplication
            self.hsrOperationMode = hsrOperationMode
            self.hsrReplicationMode = hsrReplicationMode
            self.hsrTier = hsrTier
        }

        private enum CodingKeys: String, CodingKey {
            case clusterStatus = "ClusterStatus"
            case enqueueReplication = "EnqueueReplication"
            case hsrOperationMode = "HsrOperationMode"
            case hsrReplicationMode = "HsrReplicationMode"
            case hsrTier = "HsrTier"
        }
    }

    public struct Resource: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the source resource. Example of ResourceArn: "arn:aws:ec2:us-east-1:111111111111:instance/i-abcdefgh987654321"
        public let resourceArn: String?
        /// The resource type. Example of ResourceType: "AWS::SystemsManagerSAP::Component" or "AWS::EC2::Instance".
        public let resourceType: String?

        @inlinable
        public init(resourceArn: String? = nil, resourceType: String? = nil) {
            self.resourceArn = resourceArn
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case resourceType = "ResourceType"
        }
    }

    public struct RuleResult: AWSDecodableShape {
        /// A description of what the rule validates.
        public let description: String?
        /// The unique identifier of the rule result.
        public let id: String?
        /// A message providing details about the rule result.
        public let message: String?
        /// Additional metadata associated with the rule result.
        public let metadata: [String: String]?
        /// The status of the rule result.
        public let status: RuleResultStatus?

        @inlinable
        public init(description: String? = nil, id: String? = nil, message: String? = nil, metadata: [String: String]? = nil, status: RuleResultStatus? = nil) {
            self.description = description
            self.id = id
            self.message = message
            self.metadata = metadata
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case id = "Id"
            case message = "Message"
            case metadata = "Metadata"
            case status = "Status"
        }
    }

    public struct RuleStatusCounts: AWSDecodableShape {
        /// The number of rules that failed.
        public let failed: Int?
        /// The number of rules that returned informational results.
        public let info: Int?
        /// The number of rules that passed.
        public let passed: Int?
        /// The number of rules with unknown status.
        public let unknown: Int?
        /// The number of rules that returned warnings.
        public let warning: Int?

        @inlinable
        public init(failed: Int? = nil, info: Int? = nil, passed: Int? = nil, unknown: Int? = nil, warning: Int? = nil) {
            self.failed = failed
            self.info = info
            self.passed = passed
            self.unknown = unknown
            self.warning = warning
        }

        private enum CodingKeys: String, CodingKey {
            case failed = "Failed"
            case info = "Info"
            case passed = "Passed"
            case unknown = "Unknown"
            case warning = "Warning"
        }
    }

    public struct StartApplicationInput: AWSEncodableShape {
        /// The ID of the application.
        public let applicationId: String

        @inlinable
        public init(applicationId: String) {
            self.applicationId = applicationId
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 60)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\w\\d\\.-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
        }
    }

    public struct StartApplicationOutput: AWSDecodableShape {
        /// The ID of the operation.
        public let operationId: String?

        @inlinable
        public init(operationId: String? = nil) {
            self.operationId = operationId
        }

        private enum CodingKeys: String, CodingKey {
            case operationId = "OperationId"
        }
    }

    public struct StartApplicationRefreshInput: AWSEncodableShape {
        /// The ID of the application.
        public let applicationId: String

        @inlinable
        public init(applicationId: String) {
            self.applicationId = applicationId
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 60)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\w\\d\\.-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
        }
    }

    public struct StartApplicationRefreshOutput: AWSDecodableShape {
        /// The ID of the operation.
        public let operationId: String?

        @inlinable
        public init(operationId: String? = nil) {
            self.operationId = operationId
        }

        private enum CodingKeys: String, CodingKey {
            case operationId = "OperationId"
        }
    }

    public struct StartConfigurationChecksInput: AWSEncodableShape {
        /// The ID of the application.
        public let applicationId: String
        /// The list of configuration checks to perform.
        public let configurationCheckIds: [ConfigurationCheckType]?

        @inlinable
        public init(applicationId: String, configurationCheckIds: [ConfigurationCheckType]? = nil) {
            self.applicationId = applicationId
            self.configurationCheckIds = configurationCheckIds
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 60)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\w\\d\\.-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case configurationCheckIds = "ConfigurationCheckIds"
        }
    }

    public struct StartConfigurationChecksOutput: AWSDecodableShape {
        /// The configuration check operations that were started.
        public let configurationCheckOperations: [ConfigurationCheckOperation]?

        @inlinable
        public init(configurationCheckOperations: [ConfigurationCheckOperation]? = nil) {
            self.configurationCheckOperations = configurationCheckOperations
        }

        private enum CodingKeys: String, CodingKey {
            case configurationCheckOperations = "ConfigurationCheckOperations"
        }
    }

    public struct StopApplicationInput: AWSEncodableShape {
        /// The ID of the application.
        public let applicationId: String
        /// Boolean. If included and if set to True, the StopApplication operation will shut down the associated Amazon EC2 instance in addition to the application.
        public let includeEc2InstanceShutdown: Bool?
        /// Specify the ConnectedEntityType. Accepted type is DBMS. If this parameter is included, the connected DBMS (Database Management System) will be stopped.
        public let stopConnectedEntity: ConnectedEntityType?

        @inlinable
        public init(applicationId: String, includeEc2InstanceShutdown: Bool? = nil, stopConnectedEntity: ConnectedEntityType? = nil) {
            self.applicationId = applicationId
            self.includeEc2InstanceShutdown = includeEc2InstanceShutdown
            self.stopConnectedEntity = stopConnectedEntity
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 60)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\w\\d\\.-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case includeEc2InstanceShutdown = "IncludeEc2InstanceShutdown"
            case stopConnectedEntity = "StopConnectedEntity"
        }
    }

    public struct StopApplicationOutput: AWSDecodableShape {
        /// The ID of the operation.
        public let operationId: String?

        @inlinable
        public init(operationId: String? = nil) {
            self.operationId = operationId
        }

        private enum CodingKeys: String, CodingKey {
            case operationId = "OperationId"
        }
    }

    public struct SubCheckResult: AWSDecodableShape {
        /// A description of what the sub-check validates.
        public let description: String?
        /// The unique identifier of the sub-check result.
        public let id: String?
        /// The name of the sub-check.
        public let name: String?
        /// A list of references or documentation links related to the sub-check.
        public let references: [String]?

        @inlinable
        public init(description: String? = nil, id: String? = nil, name: String? = nil, references: [String]? = nil) {
            self.description = description
            self.id = id
            self.name = name
            self.references = references
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case id = "Id"
            case name = "Name"
            case references = "References"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String
        /// The tags on a resource.
        public let tags: [String: String]

        @inlinable
        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
            try container.encode(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(.+:){2,4}.+$|^arn:(.+:){1,3}.+\\/.+$")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String
        /// Adds/updates or removes credentials for applications registered with AWS Systems Manager for SAP.
        public let tagKeys: [String]

        @inlinable
        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "resourceArn")
            request.encodeQuery(self.tagKeys, key: "tagKeys")
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(.+:){2,4}.+$|^arn:(.+:){1,3}.+\\/.+$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^(?!aws:)[a-zA-Z+-=._:/]+$")
            }
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateApplicationSettingsInput: AWSEncodableShape {
        /// The ID of the application.
        public let applicationId: String
        /// Installation of AWS Backint Agent for SAP HANA.
        public let backint: BackintConfig?
        /// The credentials to be added or updated.
        public let credentialsToAddOrUpdate: [ApplicationCredential]?
        /// The credentials to be removed.
        public let credentialsToRemove: [ApplicationCredential]?
        /// The Amazon Resource Name of the SAP HANA database that replaces the current SAP HANA connection with the SAP_ABAP application.
        public let databaseArn: String?

        @inlinable
        public init(applicationId: String, backint: BackintConfig? = nil, credentialsToAddOrUpdate: [ApplicationCredential]? = nil, credentialsToRemove: [ApplicationCredential]? = nil, databaseArn: String? = nil) {
            self.applicationId = applicationId
            self.backint = backint
            self.credentialsToAddOrUpdate = credentialsToAddOrUpdate
            self.credentialsToRemove = credentialsToRemove
            self.databaseArn = databaseArn
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationId, name: "applicationId", parent: name, max: 60)
            try self.validate(self.applicationId, name: "applicationId", parent: name, min: 1)
            try self.validate(self.applicationId, name: "applicationId", parent: name, pattern: "^[\\w\\d\\.-]+$")
            try self.credentialsToAddOrUpdate?.forEach {
                try $0.validate(name: "\(name).credentialsToAddOrUpdate[]")
            }
            try self.validate(self.credentialsToAddOrUpdate, name: "credentialsToAddOrUpdate", parent: name, max: 20)
            try self.credentialsToRemove?.forEach {
                try $0.validate(name: "\(name).credentialsToRemove[]")
            }
            try self.validate(self.credentialsToRemove, name: "credentialsToRemove", parent: name, max: 20)
            try self.validate(self.databaseArn, name: "databaseArn", parent: name, pattern: "^arn:(.+:){2,4}.+$|^arn:(.+:){1,3}.+\\/.+$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case backint = "Backint"
            case credentialsToAddOrUpdate = "CredentialsToAddOrUpdate"
            case credentialsToRemove = "CredentialsToRemove"
            case databaseArn = "DatabaseArn"
        }
    }

    public struct UpdateApplicationSettingsOutput: AWSDecodableShape {
        /// The update message.
        public let message: String?
        /// The IDs of the operations.
        public let operationIds: [String]?

        @inlinable
        public init(message: String? = nil, operationIds: [String]? = nil) {
            self.message = message
            self.operationIds = operationIds
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case operationIds = "OperationIds"
        }
    }
}

// MARK: - Errors

/// Error enum for SsmSap
public struct SsmSapErrorType: AWSErrorType {
    enum Code: String {
        case conflictException = "ConflictException"
        case internalServerException = "InternalServerException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case unauthorizedException = "UnauthorizedException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize SsmSap
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// A conflict has occurred.
    public static var conflictException: Self { .init(.conflictException) }
    /// An internal error has occurred.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The resource is not available.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The request is not authorized.
    public static var unauthorizedException: Self { .init(.unauthorizedException) }
    /// The input fails to satisfy the constraints specified by an AWS service.
    public static var validationException: Self { .init(.validationException) }
}

extension SsmSapErrorType: Equatable {
    public static func == (lhs: SsmSapErrorType, rhs: SsmSapErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension SsmSapErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
